import { PATH_URL } from '@/config/axios'
import { getToken } from '@/utils'
import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()
/***
/**
 *@author lxc
 *@description:获取文件下载地址
 *@param:
 *@date: 2022-06-13 11:45:34
 **/
export function getFileUrl(fileId) {
  let url = PATH_URL + 'form/file/previewFile?isScale=true'
  url += '&fileId=' + fileId
  url += '&time=' + new Date().getTime()
  url += '&token=' + getToken()
  return url
}
/**
 *@author lxc
 *@description:测试上传文件临时
 *@param:
 *@date: 2022-07-25 14:45:40
 **/
export function testUpfile(data) {
  return request.postXww({
    url: 'user/voucherDetail/importData',
    data
  })
}
